<?php
/**
 * (commands) 标签匹配
 */
namespace App\Console\Commands\Quality;

use App\Logic\Quality\Quality;
use Illuminate\Console\Command;
class QualityMatchDictTag extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'quality:match-dict-tag';

    /**
     * The console command description.
     * @var string
     */
    protected $description = 'quality match dict tag';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $action = $this->choice('choice exe func: ', ['dictTagCustomerReturn', 'dictTagComplaint']);
        if($action){
            Quality::{$action}();
            $this->info($action.' exe success!');
        }else{
            $this->error('wrong: choice exe item!');
        }
        $this->info('finish!');
    }
}
